﻿using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;

namespace Lk.EfModel.Models
{
    public partial class FiveIEnglishContext : DbContext
    {
        public FiveIEnglishContext()
        {
        }

        public FiveIEnglishContext(DbContextOptions<FiveIEnglishContext> options)
            : base(options)
        {
        }

        public virtual DbSet<Admin> Admin { get; set; }
        public virtual DbSet<AdminAction> AdminAction { get; set; }
        public virtual DbSet<AuthToken> AuthToken { get; set; }
        public virtual DbSet<Category> Category { get; set; }
        public virtual DbSet<Course> Course { get; set; }
        public virtual DbSet<CourseDetail> CourseDetail { get; set; }
        public virtual DbSet<KnowledgeCategory> KnowledgeCategory { get; set; }
        public virtual DbSet<Order> Order { get; set; }
        public virtual DbSet<OrderDetail> OrderDetail { get; set; }
        public virtual DbSet<Questions> Questions { get; set; }
        public virtual DbSet<QuestionsCategory> QuestionsCategory { get; set; }
        public virtual DbSet<QuestionsKnowledgeCategory> QuestionsKnowledgeCategory { get; set; }
        public virtual DbSet<QuestionsSelect> QuestionsSelect { get; set; }
        public virtual DbSet<ScoreRule> ScoreRule { get; set; }
        public virtual DbSet<UserAnswerRecord> UserAnswerRecord { get; set; }
        public virtual DbSet<UserCourse> UserCourse { get; set; }
        public virtual DbSet<UserCourseVideo> UserCourseVideo { get; set; }
        public virtual DbSet<Users> Users { get; set; }
        public virtual DbSet<UserScoreRecord> UserScoreRecord { get; set; }
        public virtual DbSet<Video> Video { get; set; }
        public virtual DbSet<VideoTimePoint> VideoTimePoint { get; set; }
        public virtual DbSet<VideoTimePointQuestions> VideoTimePointQuestions { get; set; }
        public virtual DbSet<WechatToken> WechatToken { get; set; }
        public virtual DbSet<WeChatType> WeChatType { get; set; }

        // Unable to generate entity type for table 'dbo.course_filter'. Please see the warning messages.
        // Unable to generate entity type for table 'dbo.permission'. Please see the warning messages.
        // Unable to generate entity type for table 'dbo.course_detail_video'. Please see the warning messages.
        // Unable to generate entity type for table 'dbo.lexicon'. Please see the warning messages.

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (!optionsBuilder.IsConfigured)
            {
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings.
                optionsBuilder.UseSqlServer("Server=.;Database=FiveIEnglish;Uid=sa;pwd=111;Trusted_Connection=True");
            }
        }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<Admin>(entity =>
            {
                entity.ToTable("admin");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.AuthKey)
                    .HasColumnName("auth_key")
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.ClientType).HasColumnName("client_type");

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.ExpireTime)
                    .HasColumnName("expire_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Password)
                    .IsRequired()
                    .HasColumnName("password")
                    .HasMaxLength(500);

                entity.Property(e => e.PasswordSalt)
                    .HasColumnName("password_salt")
                    .HasMaxLength(100)
                    .IsUnicode(false);

                entity.Property(e => e.State).HasColumnName("state");

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.UserName)
                    .IsRequired()
                    .HasColumnName("user_name")
                    .HasMaxLength(50);
            });

            modelBuilder.Entity<AdminAction>(entity =>
            {
                entity.ToTable("admin_action");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.Action)
                    .HasColumnName("action")
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.ActionCode)
                    .HasColumnName("action_code")
                    .HasMaxLength(100);

                entity.Property(e => e.ActionType).HasColumnName("action_type");

                entity.Property(e => e.Controller)
                    .HasColumnName("controller")
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.MenuId).HasColumnName("menu_id");

                entity.Property(e => e.Name)
                    .HasColumnName("name")
                    .HasMaxLength(100);
            });

            modelBuilder.Entity<AuthToken>(entity =>
            {
                entity.ToTable("auth_token");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.AccountId).HasColumnName("account_id");

                entity.Property(e => e.ClientType).HasColumnName("client_type");

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.ExpireTime)
                    .HasColumnName("expire_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Token)
                    .HasColumnName("token")
                    .HasMaxLength(100)
                    .IsUnicode(false);
            });

            modelBuilder.Entity<Category>(entity =>
            {
                entity.ToTable("category");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.CategoryId).HasColumnName("category_id");

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Name)
                    .HasColumnName("name")
                    .HasMaxLength(50);

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<Course>(entity =>
            {
                entity.ToTable("course");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.BuyLimit).HasColumnName("buy_limit");

                entity.Property(e => e.CategoryId)
                    .HasColumnName("category_id")
                    .HasMaxLength(50);

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Description).HasColumnName("description");

                entity.Property(e => e.DetailHtml).HasColumnName("detail_html");

                entity.Property(e => e.Img)
                    .HasColumnName("img")
                    .HasMaxLength(500);

                entity.Property(e => e.MainImg)
                    .HasColumnName("main_img")
                    .HasMaxLength(500);

                entity.Property(e => e.Name)
                    .HasColumnName("name")
                    .HasMaxLength(50);

                entity.Property(e => e.ProductId)
                    .IsRequired()
                    .HasColumnName("product_id")
                    .HasMaxLength(50);

                entity.Property(e => e.ShopPrice).HasColumnName("shop_price");

                entity.Property(e => e.State).HasColumnName("state");

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<CourseDetail>(entity =>
            {
                entity.ToTable("course_detail");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.IconUrl)
                    .HasColumnName("icon_url")
                    .HasMaxLength(300);

                entity.Property(e => e.OriPrice).HasColumnName("ori_price");

                entity.Property(e => e.Price).HasColumnName("price");

                entity.Property(e => e.ProductCode)
                    .HasColumnName("product_code")
                    .HasMaxLength(20)
                    .IsUnicode(false);

                entity.Property(e => e.ProductId)
                    .IsRequired()
                    .HasColumnName("product_id")
                    .HasMaxLength(50);

                entity.Property(e => e.Quantity).HasColumnName("quantity");

                entity.Property(e => e.SkuId).HasColumnName("sku_id");

                entity.Property(e => e.SkuName)
                    .HasColumnName("sku_name")
                    .HasMaxLength(50);

                entity.Property(e => e.SkuNormtermIds)
                    .HasColumnName("sku_normterm_ids")
                    .HasMaxLength(20);

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.VideoIds).HasColumnName("video_ids");
            });

            modelBuilder.Entity<KnowledgeCategory>(entity =>
            {
                entity.ToTable("knowledge_category");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Description)
                    .HasColumnName("description")
                    .HasMaxLength(500);

                entity.Property(e => e.Name)
                    .IsRequired()
                    .HasColumnName("name")
                    .HasMaxLength(50);

                entity.Property(e => e.ParentId).HasColumnName("parent_id");

                entity.Property(e => e.State).HasColumnName("state");

                entity.Property(e => e.Type).HasColumnName("type");

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<Order>(entity =>
            {
                entity.ToTable("order");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.OpenId)
                    .HasColumnName("open_id")
                    .HasMaxLength(50);

                entity.Property(e => e.OrderId)
                    .HasColumnName("order_id")
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.PayPrice).HasColumnName("pay_price");

                entity.Property(e => e.PrepayId)
                    .HasColumnName("prepay_id")
                    .HasMaxLength(50);

                entity.Property(e => e.PullState).HasColumnName("pull_state");

                entity.Property(e => e.PushState).HasColumnName("push_state");

                entity.Property(e => e.ResultMsg)
                    .HasColumnName("result_msg")
                    .HasMaxLength(50);

                entity.Property(e => e.SkuInfos)
                    .HasColumnName("sku_infos")
                    .HasMaxLength(500);

                entity.Property(e => e.SourceId).HasColumnName("source_id");

                entity.Property(e => e.Status).HasColumnName("status");

                entity.Property(e => e.TotalPrice).HasColumnName("total_price");

                entity.Property(e => e.Type).HasColumnName("type");
            });

            modelBuilder.Entity<OrderDetail>(entity =>
            {
                entity.ToTable("order_detail");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.CourseDetailId).HasColumnName("course_detail_id");

                entity.Property(e => e.OrderId).HasColumnName("order_id");

                entity.Property(e => e.Pric)
                    .HasColumnName("pric")
                    .HasColumnType("decimal(18, 0)");

                entity.Property(e => e.ProductId)
                    .HasColumnName("product_id")
                    .HasMaxLength(50);
            });

            modelBuilder.Entity<Questions>(entity =>
            {
                entity.ToTable("questions");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Description)
                    .HasColumnName("description")
                    .HasMaxLength(2000);

                entity.Property(e => e.Difficulty).HasColumnName("difficulty");

                entity.Property(e => e.KnowledgeCategorys)
                    .HasColumnName("knowledge_categorys")
                    .HasMaxLength(2000);

                entity.Property(e => e.QuestionsCategoryId).HasColumnName("questions_category_id");

                entity.Property(e => e.State).HasColumnName("state");

                entity.Property(e => e.Tag)
                    .HasColumnName("tag")
                    .HasMaxLength(50);

                entity.Property(e => e.Title)
                    .IsRequired()
                    .HasColumnName("title")
                    .HasMaxLength(300);

                entity.Property(e => e.Type).HasColumnName("type");

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<QuestionsCategory>(entity =>
            {
                entity.ToTable("questions_category");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Description)
                    .HasColumnName("description")
                    .HasMaxLength(500);

                entity.Property(e => e.Name)
                    .IsRequired()
                    .HasColumnName("name")
                    .HasMaxLength(50);

                entity.Property(e => e.ParentId).HasColumnName("parent_id");

                entity.Property(e => e.State).HasColumnName("state");

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<QuestionsKnowledgeCategory>(entity =>
            {
                entity.ToTable("questions_knowledge_category");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.KnowledgeCategoryId).HasColumnName("knowledge_category_id");

                entity.Property(e => e.QuestionsId).HasColumnName("questions_id");
            });

            modelBuilder.Entity<QuestionsSelect>(entity =>
            {
                entity.ToTable("questions_select");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.Contents)
                    .HasColumnName("contents")
                    .HasMaxLength(100);

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.IsAnswer).HasColumnName("is_answer");

                entity.Property(e => e.Mark)
                    .HasColumnName("mark")
                    .HasMaxLength(10);

                entity.Property(e => e.QuestionsId).HasColumnName("questions_id");

                entity.Property(e => e.State).HasColumnName("state");

                entity.Property(e => e.Title)
                    .IsRequired()
                    .HasColumnName("title")
                    .HasMaxLength(300);

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<ScoreRule>(entity =>
            {
                entity.ToTable("score_rule");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.CreaterId).HasColumnName("creater_id");

                entity.Property(e => e.Description)
                    .HasColumnName("description")
                    .HasMaxLength(500);

                entity.Property(e => e.Score).HasColumnName("score");

                entity.Property(e => e.State).HasColumnName("state");

                entity.Property(e => e.Title)
                    .HasColumnName("title")
                    .HasMaxLength(50);

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<UserAnswerRecord>(entity =>
            {
                entity.ToTable("user_answer_record");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.AnswerIds)
                    .HasColumnName("answer_ids")
                    .HasMaxLength(500);

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Device)
                    .HasColumnName("device")
                    .HasMaxLength(50);

                entity.Property(e => e.Ip)
                    .HasColumnName("ip")
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.IsAnswerCorrect).HasColumnName("is_answer_correct");

                entity.Property(e => e.MachineCode)
                    .HasColumnName("machine_code")
                    .HasMaxLength(50);

                entity.Property(e => e.QuestionsId).HasColumnName("questions_id");

                entity.Property(e => e.Score).HasColumnName("score");

                entity.Property(e => e.SourceId).HasColumnName("source_id");

                entity.Property(e => e.UserId).HasColumnName("user_id");

                entity.Property(e => e.VideoId).HasColumnName("video_id");
            });

            modelBuilder.Entity<UserCourse>(entity =>
            {
                entity.ToTable("user_course");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.LastStudyTime)
                    .HasColumnName("last_study_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.LastWatchTime)
                    .HasColumnName("last_watch_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.OpenId)
                    .HasColumnName("open_id")
                    .HasMaxLength(50)
                    .IsUnicode(false);

                entity.Property(e => e.OrderId).HasColumnName("order_id");

                entity.Property(e => e.ProductId)
                    .HasColumnName("product_id")
                    .HasMaxLength(50);

                entity.Property(e => e.Schedule).HasColumnName("schedule");

                entity.Property(e => e.State).HasColumnName("state");

                entity.Property(e => e.StuId).HasColumnName("stu_id");

                entity.Property(e => e.StuName)
                    .HasColumnName("stu_name")
                    .HasMaxLength(20);

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.UserId).HasColumnName("user_id");

                entity.Property(e => e.VideoId).HasColumnName("video_id");
            });

            modelBuilder.Entity<UserCourseVideo>(entity =>
            {
                entity.ToTable("user_course_video");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Percent).HasColumnName("percent");

                entity.Property(e => e.ProductId)
                    .HasColumnName("product_id")
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.Schedule).HasColumnName("schedule");

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.UserCourseId).HasColumnName("user_course_id");

                entity.Property(e => e.VideoId).HasColumnName("video_id");
            });

            modelBuilder.Entity<Users>(entity =>
            {
                entity.ToTable("users");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.AppletOpenId)
                    .HasColumnName("applet_open_id")
                    .HasMaxLength(30);

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.HeadImgUrl)
                    .HasColumnName("head_img_url")
                    .HasMaxLength(300);

                entity.Property(e => e.LastReadVideoId).HasColumnName("last_read_video_id");

                entity.Property(e => e.NickName)
                    .HasColumnName("nick_name")
                    .HasMaxLength(50);

                entity.Property(e => e.OpenId)
                    .HasColumnName("open_id")
                    .HasMaxLength(30);

                entity.Property(e => e.PassWord)
                    .HasColumnName("pass_word")
                    .HasMaxLength(500);

                entity.Property(e => e.ShopingAppletOpenId)
                    .HasColumnName("shoping_applet_open_id")
                    .HasMaxLength(30);

                entity.Property(e => e.State).HasColumnName("state");

                entity.Property(e => e.TotalScore).HasColumnName("total_score");

                entity.Property(e => e.Unionid)
                    .HasColumnName("unionid")
                    .HasMaxLength(30);

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.UserName)
                    .HasColumnName("user_name")
                    .HasMaxLength(50);
            });

            modelBuilder.Entity<UserScoreRecord>(entity =>
            {
                entity.ToTable("user_score_record");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.AfterRecordValue).HasColumnName("after_record_value");

                entity.Property(e => e.BeforeRecordValue).HasColumnName("before_record_value");

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Device)
                    .HasColumnName("device")
                    .HasMaxLength(50);

                entity.Property(e => e.Ip)
                    .HasColumnName("ip")
                    .HasMaxLength(30)
                    .IsUnicode(false);

                entity.Property(e => e.MachineCode)
                    .HasColumnName("machine_code")
                    .HasMaxLength(50);

                entity.Property(e => e.Remarks)
                    .HasColumnName("remarks")
                    .HasMaxLength(50);

                entity.Property(e => e.Score).HasColumnName("score");

                entity.Property(e => e.ScoreRuleId).HasColumnName("score_rule_id");

                entity.Property(e => e.SourceId).HasColumnName("source_id");

                entity.Property(e => e.Type).HasColumnName("type");

                entity.Property(e => e.UserId).HasColumnName("user_id");
            });

            modelBuilder.Entity<Video>(entity =>
            {
                entity.ToTable("video");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.CdnStatus).HasColumnName("cdn_status");

                entity.Property(e => e.ClassId)
                    .HasColumnName("class_id")
                    .HasMaxLength(20);

                entity.Property(e => e.ClassName)
                    .HasColumnName("class_name")
                    .HasMaxLength(20);

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Description).HasColumnName("description");

                entity.Property(e => e.Duration)
                    .HasColumnName("duration")
                    .HasMaxLength(20);

                entity.Property(e => e.FileId)
                    .HasColumnName("file_id")
                    .HasMaxLength(50);

                entity.Property(e => e.FileName)
                    .HasColumnName("file_name")
                    .HasMaxLength(50);

                entity.Property(e => e.FileUrl)
                    .HasColumnName("file_url")
                    .HasMaxLength(500);

                entity.Property(e => e.HlsHdUrl)
                    .HasColumnName("hls_hd_url")
                    .HasMaxLength(500);

                entity.Property(e => e.HslSdUrl)
                    .HasColumnName("hsl_sd_url")
                    .HasMaxLength(500);

                entity.Property(e => e.ImageUrl)
                    .HasColumnName("image_url")
                    .HasMaxLength(500);

                entity.Property(e => e.IsFree).HasColumnName("is_free");

                entity.Property(e => e.Mp4HdUrl)
                    .HasColumnName("mp4_hd_url")
                    .HasMaxLength(500);

                entity.Property(e => e.Mp4SdUrl)
                    .HasColumnName("mp4_sd_url")
                    .HasMaxLength(500);

                entity.Property(e => e.Size)
                    .HasColumnName("size")
                    .HasMaxLength(20);

                entity.Property(e => e.Status).HasColumnName("status");

                entity.Property(e => e.Tags)
                    .HasColumnName("tags")
                    .HasMaxLength(50);

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Vid)
                    .HasColumnName("vid")
                    .HasMaxLength(200);
            });

            modelBuilder.Entity<VideoTimePoint>(entity =>
            {
                entity.ToTable("video_time_point");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.AnswerTime).HasColumnName("answer_time");

                entity.Property(e => e.CreateTime)
                    .HasColumnName("create_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.State).HasColumnName("state");

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.VideoId).HasColumnName("video_id");
            });

            modelBuilder.Entity<VideoTimePointQuestions>(entity =>
            {
                entity.ToTable("video_time_point_questions");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.QuestionsId).HasColumnName("questions_id");

                entity.Property(e => e.VideoTimePointId).HasColumnName("video_time_point_id");
            });

            modelBuilder.Entity<WechatToken>(entity =>
            {
                entity.ToTable("wechat_token");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.AppId)
                    .IsRequired()
                    .HasColumnName("app_id")
                    .HasMaxLength(50);

                entity.Property(e => e.ExpiresTime)
                    .HasColumnName("expires_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Secret)
                    .IsRequired()
                    .HasColumnName("secret")
                    .HasMaxLength(50);

                entity.Property(e => e.Token)
                    .IsRequired()
                    .HasColumnName("token")
                    .HasMaxLength(500);

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");
            });

            modelBuilder.Entity<WeChatType>(entity =>
            {
                entity.ToTable("weChat_type");

                entity.Property(e => e.Id)
                    .HasColumnName("id")
                    .ValueGeneratedNever();

                entity.Property(e => e.AppId)
                    .HasColumnName("app_id")
                    .HasMaxLength(50);

                entity.Property(e => e.ExpiresTime)
                    .HasColumnName("expires_time")
                    .HasColumnType("datetime");

                entity.Property(e => e.Secret)
                    .HasColumnName("secret")
                    .HasMaxLength(50);

                entity.Property(e => e.Token)
                    .HasColumnName("token")
                    .HasMaxLength(500);

                entity.Property(e => e.UpdateTime)
                    .HasColumnName("update_time")
                    .HasColumnType("datetime");
            });
        }
    }
}
